home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / Signal.a < prev    next >
Encoding:
Text File  |  1993-12-02  |  1.5 KB  |  53 lines  |  [TEXT/MPS ]

  1. ;  File Signal.a
  2. ;
  3. ;  Copyright Apple Computer, Inc. 1986, 1990-1991
  4. ;  All rights reserved.
  5. ;
  6. ;  Include File for Signal processing in the MPW Environment
  7.  
  8. ;  Set CASE OBJECT to assure references to the names IMPORTed here link
  9. ;  properly.  The following statements restore the CASE setting to its
  10. ;  previous value.
  11.  
  12.     IF &TYPE('__INCLUDINGSIGNAL__') = 'UNDEFINED' THEN
  13. __INCLUDINGSIGNAL__    SET    1
  14.  
  15.             PRINT            Push,Off            ; save the current print settings and turn it off
  16.             GBLC            &S%%%%,&P%%%%
  17. &S%%%%        SETC            &Setting('CASE')    ; save the current CASE setting
  18. &P%%%%        SETC            &Setting('PRINT',1) ; and the PRINT settings before we changed them
  19.  
  20.             MACRO                
  21.             X%%%%
  22.             GBLC            &S%%%%,&P%%%%        ; link references with previously defined variables
  23.             PRINT            Push,&P%%%%         ; restore the previous PRINT settings
  24.             CASE            &S%%%%                ; and restore the CASE setting
  25.             PRINT            POP                 ; restore the PRINT settings
  26.             ENDM
  27.  
  28.             PRINT            Pop                 ; restore the PRINT settings
  29.             CASE            OBJECT                ; all imported/exported names case significant
  30.  
  31.  
  32. SIG_DFL        EQU             1
  33. SIG_ERR        EQU             -1
  34. SIG_IGN        EQU             0
  35. SIG_HOLD    EQU             3
  36. SIG_RELEASE    EQU             5
  37.  
  38. SIGABRT        EQU             $0001
  39. SIGINT        EQU             $0002
  40. SIGFPE        EQU             $0004
  41. SIGILL        EQU             $0008
  42. SIGSEGV        EQU             $0010
  43. SIGTERM        EQU             $0020
  44.  
  45.             IMPORT            signal
  46.             IMPORT            raise
  47.  
  48.             PRINT            Push,Off            ; save and turn off PRINT when macro is invoked
  49.             X%%%%                                ; invoke the macro to restore CASE setting
  50.             PRINT            POP                 ; restore the PRINT settings
  51.  
  52.  
  53.     ENDIF    ; ...already included